/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ConsultasProducciones;
import Conexion.Conexion;
import java.sql.*;
/**
 *
 * @author GJ_ASPRILLA
 */
public class UsoSuelo {
     private static Conexion conn = Conexion.getInstance();
    public static void main(String[] args) {
        try {
            
            Statement statement;
            ResultSet rs;
            statement = conn.getConection().createStatement();
  String QueryString = "SELECT * FROM [AgronetEVA].[dbo].[Pecuario_Produccion]";
  rs = statement.executeQuery(QueryString);
  while (rs.next()) {
  System.out.println(rs.getInt(1) + " " + rs.getString(2) + "" + rs.getString(3) + "  "+rs.getString(4)+"\n");
  }
  }
  catch (Exception ex) {
  System.out.println("Unable to connect to batabase.");
  }
  }
  
  }
 
  